/**
 * @file bsp_speaker_driver.h
 * @author liufeng (liufeng@injoinic.com)
 * @brief wt588F02B语音模块驱动头文件
 * @version 0.1
 * @date 2024-12-12
 *
 * @copyright Copyright (c) 2024  injoinic
 *
 */

#ifndef __BSP_SPEAKER_DRIVER_H__
#define __BSP_SPEAKER_DRIVER_H__

#include "FreeRTOS.h"
#include "semphr.h"
#include "stdint.h"
#include "task.h"

typedef struct
{
    SemaphoreHandle_t tx_cmp; // 传输完成的信号量
    uint8_t (*pf_spk_busy)(); // 读busy电平

    void (*pf_init)();
    void (*pf_start_play)(uint8_t index);
    void (*pf_stop_play)();
    void (*pf_set_volume)(uint8_t volume);
} wt588_driver_typedef;

extern void wt588_construct(wt588_driver_typedef*);

#endif /* __BSP_SPEAKER_DRIVER_H__ */
